import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/Login'
    },
    {
      path: '/Login',
      name: 'login',
      component: () => import('../views/Login.vue'),
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('../views/HomeView.vue'),
      children: [
        {
          path: '/refund-application',
          name: 'refund-application',
          component: () => import('../views/RefundApplication.vue'),
        },
        {
          path: '/refund-detail-pending/:id?',
          name: 'refund-detail-pending',
          component: () => import('../views/RefundDetailPending.vue'),
        },
        {
          path: '/refund-detail-processed/:id?',
          name: 'refund-detail-processed',
          component: () => import('../views/RefundDetailProcessed.vue'),
        },
        {
          path: '/refund-detail-rejected/:id?',
          name: 'refund-detail-rejected',
          component: () => import('../views/RefundDetailRejected.vue'),
        },
        {
          path: '/drug-order-management',
          name: 'drug-order-management',
          component: () => import('../views/DrugOrderManagement.vue'),
        },
        {
          path: '/medical-order-detail/:id',
          name: 'medical-order-detail',
          component: () => import('../views/MedicalOrderDetail.vue'),
        },
        {
          path: '/drug-detail-shipping',
          name: 'drug-detail-shipping',
          component: () => import('../views/DrugDetailShipping.vue'),
        },
        {
          path: '/drug-detail-receiving',
          name: 'drug-detail-receiving',
          component: () => import('../views/DrugDetailReceiving.vue'),
        },
        {
          path: '/drug-detail-received',
          name: 'drug-detail-received',
          component: () => import('../views/DrugDetailReceived.vue'),
        },
        {
          path: '/prescription-order-management',
          name: 'prescription-order-management',
          component: () => import('../views/PrescriptionOrderManagement.vue'),
        },
        {
          path: '/prescription-order-detail/:id',
          name: 'prescription-order-detail',
          component: () => import('../views/PrescriptionOrderDetail.vue'),
        },
        {
          path: '/order-detail-to-be-paid',
          name: 'order-detail-to-be-paid',
          component: () => import('../views/OrderDetailToBePaid.vue'),
        },
        {
          path: '/order-detail-approved-for-dispensing',
          name: 'order-detail-approved-for-dispensing',
          component: () => import('../views/OrderDetailApprovedForDispensing.vue'),
        },
        {
          path: '/order-detail-expired',
          name: 'order-detail-expired',
          component: () => import('../views/OrderDetailExpired.vue'),
        },
        {
          path: '/order-detail-not-approved-for-dispensing',
          name: 'order-detail-not-approved-for-dispensing',
          component: () => import('../views/OrderDetailNotApprovedForDispensing.vue'),
        },
        {
          path: '/consultation-order-management',
          name: 'consultation-order-management',
          component: () => import('../views/ConsultationOrderManagement.vue'),
        },
        {
          path: '/registration-order-management',
          name: 'registration-order-management',
          component: () => import('../views/RegistrationOrderManagement.vue'),
        },
        {
          path: '/consultation-order-detail/:id',
          name: 'consultation-order-detail',
          component: () => import('../views/ConsultationOrderDetailToBePaid.vue'),
        },
        {
          path: '/registration-order-detail/:id',
          name: 'registration-order-detail',
          component: () => import('../views/RegistrationOrderDetail.vue'),
        },
        {
          path: '/consultation-detail-pending',
          name: 'consultation-detail-pending',
          component: () => import('../views/ConsultationOrderDetailToBePaid.vue'),
        },
        {
          path: '/consultation-detail-confirmed',
          name: 'consultation-detail-confirmed',
          component: () => import('../views/ConsultationOrderDetailInProgress.vue'),
        },
        {
          path: '/consultation-detail-completed',
          name: 'consultation-detail-completed',
          component: () => import('../views/ConsultationOrderDetailCompleted.vue'),
        },
        {
          path: '/consultation-detail-cancelled',
          name: 'consultation-detail-cancelled',
          component: () => import('../views/ConsultationOrderDetailCancelled.vue'),
        },
        {
          path: '/smart-medical-rag',
          name: 'smart-medical-rag',
          component: () => import('../views/SmartMedicalRAG.vue'),
        },
        {
          path: '/test-smart-medical-rag',
          name: 'test-smart-medical-rag',
          component: () => import('../views/TestSmartMedicalRAG.vue'),
        },
        {
          path: '/test-consultation-order-detail',
          name: 'test-consultation-order-detail',
          component: () => import('../views/TestConsultationOrderDetail.vue'),
        },
        {
          path: '/test-backend-connection',
          name: 'test-backend-connection',
          component: () => import('../views/TestBackendConnection.vue'),
        },
      ]
    },
  ],
})

export default router
